<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen"/>
</head>
<body>
<header th:replace="common/top"></header>
<div id="Content">
    <div id="BackLink">
        <a th:href="'/catalog/viewCategory?categoryId='+${product.categoryId}">
            Return to <label th:text="${product.categoryId}">Category ID</label>
        </a>
    </div>

    <div id="Catalog">


        <h2 th:text="${product.name}">Product Name</h2>

        <table>
            <tr>
                <th>Item ID</th>
                <th>Product ID</th>
                <th>Description</th>
                <th>List Price</th>
                <th>&nbsp;</th>
            </tr>

            <tr th:each="item:${itemList}">
                <td><a th:href="'/catalog/viewItem?itemId='+${item.itemId}" th:text="${item.itemId}" >Item ID</a></td>
                <td th:text="${item.product.productId}">Product ID</td>
                <td th:text="${item.attribute1}">
                    Item Attributes
                </td>
                <!--                    <td th:text="${item.listPrice}">Item List Price</td>-->
                <td th:text="'$'+${#numbers.formatDecimal(item.listPrice,1,2)}">Item List Price</td>
                <td><a th:href="'/cart/addItemToCart?workingItemId='+${item.itemId}">Add to Cart</a></td>
            </tr>
        </table>
    </div>
</div>
<footer th:replace="common/bottom"></footer>
</body>
</html>